<?php

  require_once __CFG_PATH_LIBS_ADMIN."xx/class.Statistic.php";

  /*$FilterParamArray = array('seo_part');
  saveFilterParams($FilterParamArray);*/

  $stat = new Statistic();

  $StatSeoParts = $stat->getStatisticSeoParts($_SQL_TABLE[$GlobPart]);
  /*if(isBlank($_GET['seo_part']))
  {  	$_GET['seo_part'] = key($StatSeoParts);
  } */

  $tabNameParts[] = $_SQL_TABLE[$GlobPart];
  //$tabNameParts[] = $_GET['seo_part'];
  if(!$stat->checkTableExists($tabNameParts, 'createRefererHostTable', __FALSE))
  {
  	$_FLAGS['NoReadDB'] = __TRUE;
    $BodyTemplate = 'admin.body_megaerror.tpl';
    $MegaError['title'] = $ERRORS['admin'][__ERROR_NO_DATA_FOR_THIS_PERIOD];
  }
  $WorkTable = $stat->getFullTableName($tabNameParts);

  /*if(!isBlank($_GET['seo_part']))
  {
    $_FLAGS['SeoPartSelected'] = __TRUE;
  } */

  if($_REQUEST['mode'] == $GlobPart)
  {
    $PageTitle = '$language["admin"]["hosts"]." :: ".$Item["refhost"];';
  }
  else
  {
  	$PageTitle = '$language["admin"]["hosts"];';
  	$AloneMode = $GlobPart;

  	//$EnableFilter = true;
  }

  /*$listInfo['where']['seo_part'] = array(
  								'simple' => 'y',
  								'type' => 'select',
  								'title' => $language['admin']['seoPart'],
  								'values' => $StatSeoParts,
  								);

  require_once __CFG_PATH_CODE_ADMIN."admin.filter.inc";*/



  $_SQL_TABLE_FIELDS[$GlobPart] = array(

				'refhost' => array(
								'type' => 'value',
								'title' => $language['admin']['host'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['refhost'],
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatAll'],
								'size' => '30',
								'maxlength' => '255',
								),

				'count' => array(
								'type' => 'value',
								'title' => $language['admin']['count'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['count'],
								'useInList' => $CONFIG['useInListSort'],
								'size' => '5',
								'maxlength' => '11',
								),

				'date' => array(
								'type' => 'value',
								'title' => $language['admin']['date'],
								'addVariable' => 'NOW()',
								'addVarType' => $CONFIG['VarTypeSQLFunction'],
								'useInList' => $CONFIG['useInListSort'],
								'useInListEdit' => 'y',
								),

  );

  $_SQL_TABLE_EDIT_FORMS[$GlobPart] = array('active');

  $NoUse['SaveButton'] = 'y';
  $NoUse['SaveItemButton'] = 'y';
  $NoUse['DeleteButton'] = 'y';
  $NoUse['ActivateButton'] = 'y';
  $NoUse['DeactivateButton'] = 'y';
  $NoUse['AddButton'] = 'y';


?>